From bf688453e09e879c23f73bdc53bd7ca442bc9236 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C3=98yvind=20Kol=C3=A5s?= Date: Wed, 16 Nov 2016 20:40:58 +0100 Subject: [PATCH] tools: add babl-verify start of an development aid when improving fast paths This tool take the names of source/target formats - and prints error/cost for all direct conversions matching arguments. --- tools/babl-verify.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 tools/babl-verify.c diff --git a/tools/babl-verify.c b/tools/babl-verify.c new file mode 100644 index 0000000..15654e2 --- /dev/null +++ b/tools/babl-verify.c @@ -0,0 +1,18 @@ +#include +#include +#include "babl/babl.h" + +int main (int argc, char **argv) +{ + if (argc != 3) + { + fprintf (stderr, "need two args, from and to babl-formats\n"); + return -1; + } + setenv ("BABL_DEBUG_CONVERSIONS", "1", 0); + babl_init (); + babl_fish (babl_format(argv[1]), babl_format (argv[2])); + babl_exit (); + + return 0; +} -- 2.30.2